import request from './request'

// 获取酒店列表
export function getHotelList(params?: { name?: string; minPrice?: number; maxPrice?: number }) {
  return request({
    url: '/hotels',
    method: 'get',
    params
  })
}

// 获取酒店详情
export function getHotelDetail(id: string) {
  return request({
    url: `/hotels/${id}`,
    method: 'get'
  })
}

// 获取房间详情
export function getRoomDetail(id: string) {
  return request({
    url: `/rooms/${id}`,
    method: 'get'
  })
}

// 获取酒店房间列表
export function getHotelRooms(hotelId: string, params?: { available?: boolean; checkIn?: string; checkOut?: string }) {
  return request({
    url: `/hotels/${hotelId}/rooms`,
    method: 'get',
    params
  })
}

// 获取房间可用状态
export function getRoomAvailability(roomId: string, params: { checkIn: string; checkOut: string }) {
  return request({
    url: `/rooms/${roomId}/availability`,
    method: 'get',
    params
  })
} 